<template>
  <div>
    <div class="detail-bottom">
      <div class="join-shelf btn-s" v-if="!isInShelf"  @click="handleShelf">加入书架</div>
      <div class="remove-shelf btn-s" v-else @click="handleShelf">移出书架</div>
      <div class="reading btn-s" @click="readBook">阅读</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "DetailBottom",
    props: {
      isInShelf: Boolean,
    },
    mounted(){

    },
    methods: {
      handleShelf() {//修改书架状态
        this.$emit('handleShelf');
      },
      readBook() {   //阅读电子书
        this.$emit('readBook');
      }
    }
  };
</script>

<style lang="less" scoped>
  .detail-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    box-sizing: border-box;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 15px;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 0 rgba(250, 250, 250, .9);
    .join-shelf{
      font-size: 15px;
      color: #0F87FC;
    }
    .remove-shelf{
      font-size: 15px;
      color: #F96128;
      background: #FFE6E0;
      border: 1px solid #FFAF9B;
      border-radius: 45px;
    }
    .reading{
      font-size: 15px;
      color: #fff;
      background-color: #0F87FC;
    }
  }
  .btn-s {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 160px;
    height: 40px;
    border: 1px solid #64B6FF;
    border-radius: 45px;
  }
</style>
